package myJs.cps.myTable

import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.all._
import myJs.cps._

import scala.collection.immutable.SeqMap

/** Created by yz on 15/9/2023
  */
object CheckboxSearchLiCp {

  case class Props(values: List[String], valuesChange: List[String] => Callback, optionMap: SeqMap[String, String]){
    @inline def render: VdomElement = {
      Component(this)
    }
  }

  val Component = ScalaFnComponent[Props] { props =>
    object FTool {}
    li(
      className := "myLi myInputLi dateInput",
      div(
        marginBottom := 10.px,
        span(className := "fa fa-filter"),
        s" Screening"
      ),
      div(
        marginBottom := 10.px,
        className := "form-group",
        div(
          className := "col-sm-12",
          PureSelect2MulCp.Props(
            width = "100%",
            optionMap = props.optionMap,
            value = props.values,
            onChange = props.valuesChange
          ).render
        )
      )
    )

  }

}
